Skip to content

Unify _to_date converter across arrow and polars modules#640

Closed
laughingman7743 wants to merge 2 commits intomasterfrom
feature/unify-to-date-converter
Closed

Unify _to_date converter across arrow and polars modules#640
laughingman7743 wants to merge 2 commits intomasterfrom
feature/unify-to-date-converter

Conversation

@laughingman7743
Copy link
Member

Summary

  • Moved the flexible _to_date function (handling str, datetime, and date) to the base converter module
  • Updated arrow and polars converters to import and reuse the shared function
  • Eliminates duplicate implementations across modules

Changes

  • pyathena/converter.py: Extended _to_date to handle Union[str, datetime, date]
  • pyathena/arrow/converter.py: Removed duplicate _to_date, now imports from base
  • pyathena/polars/converter.py: Removed duplicate _to_date, now imports from base

Test plan

  • make chk passes
  • CI tests pass

🤖 Generated with Claude Code

Moved the flexible _to_date function (handling str, datetime, and date)
to the base converter module and updated arrow/polars converters to
import and reuse it, eliminating duplicate implementations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@laughingman7743 laughingman7743 force-pushed the feature/unify-to-date-converter branch 2 times, most recently from ab1ee07 to 8846996 Compare January 4, 2026 16:26
Added critical rule: never commit directly to master branch,
always create feature branches and PRs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant